<include file="Public/mheader" />
<link rel="stylesheet" href="http://qncdn.game.jjcbw.com/Public/wigets/bootstrap.select/css/bootstrap-select.min.css">
<script src="http://qncdn.game.jjcbw.com/Public/wigets/bootstrap.select/js/bootstrap-select.min.js"></script>
<style>
	body{
		width:100%;
		height:100%;
		background:url(http://qncdn.game.jjcbw.com/upload/ntxx/bg_1.jpg?id=098)  no-repeat;
		background-attachment:fixed;
		/*background-size: 100% 100%;
        position: relative;*/
		background-size: cover;
		background-position: 50% 50%;
		font-family: "Helvetica Neue", Helvetica, Microsoft Yahei, Hiragino Sans GB, WenQuanYi Micro Hei, sans-serif;
		font-size:18px;
	}
	.center{
		margin:0px auto;
		padding:100px 30px 100px 30px;
	}
	.content{
		background:rgba(255,255,255,0.6);
		border-radius: 5px;
		padding: 5px;
	}
	.title{
		margin-bottom:10px;
	}
	.img{
		margin-top:10px;
	}
	.img img{
		max-width:100%;
	}

	.aw>div{
		margin: 5px -5px;
		border: #888888 1px solid;
		padding: 5px;
		border-radius: 5px;
		position: relative;
	}
	.aw>.error:after{
		content:"";
		width:3px;
		height:20px;
		position: absolute;
		right:15px;
		bottom:5px;
		border-right: red 3px solid;
		transform:rotate(45deg);
	}
	.aw>.error:before{
		content:"";
		width:3px;
		height:20px;
		position: absolute;
		right:15px;
		bottom:5px;
		border-right: red 3px solid;
		transform:rotate(-45deg);
	}
	.aw>.success:after{
		content:"";
		width:10px;
		height:20px;
		position: absolute;
		right:10px;
		bottom:5px;
		border-right: red 3px solid;
		border-bottom: red 3px solid;
		transform:rotate(45deg);
	}

	.fra{
		position:absolute;
		right:10px;
		top:10px;
		background:rgba(255,255,255,0.6);
		font-size:16px;
	}
	#time{
	}
	.cansubmit{
		position:fixed;
		left:0;
		top:0;
		width:100%;
		background:white;
		height:100%;
		padding:30px;
		z-index:5;
		overflow-y: scroll;
	}
	.submit-info{
		font-size:14px;
		margin-top:10px;
	}
	.input{
		margin-top:5px;
	}
	a.btn.btn-block{
		margin-top:5px;
		margin-bottom:5px;
	}
	.title{
		text-align:center;
	}
	.company-code{
		min-width:80px;
	}
	div>p{
		font-size: 15px;
		margin-bottom: 6px;
	}
	.index-logo{
		position: absolute;
		font-size: 14px;
		height: 5em;
		top: 1em;
		background: url(http://qncdn.game.jjcbw.com/upload/ntxx/sec_logo.png?rand=1928) no-repeat;
		background-position: center center;
		background-size: cover;
	}
	.index-logo span{
		color: red;
	}
</style>
<div class="center">
	<div class="index-logo">

	</div>
	<div class="content">
		<div class="title">竞答规则</div>

		<div>
			<p>1.确保本人参加考试，不允许任何形式的替考，一旦发现，成绩无效，取消参赛资格；</p>
			<p>2.考试期间不允许查阅其他电子设备；</p>
			<p>3.请认真填写您的姓名、手机等信息，这是您后期查询分数的保证；</p>
			<p>4.请保证考试在规定时间内一次性完成，如果中途放弃视为考试失败；</p>
			<p>5.每个参赛者有两次答题资格，取最高成绩。</p>
			<p>6.如果考试中遇到卡顿，请刷新或退出重试，只要在考试时间内完成都只记一次考试。</p>
		</div>
		<div class="title">开始竞答</div>
		<div class="input">
			<select id="group" name="group" data-live-search="true"  class="selectpicker show-tick form-control company" title="您的单位">
				<option value="" >请选择您的单位</option>
				<foreach name="group" item="v" key="k">
					<option value="{$v.id}" <eq name="testee.group" value="$v.id">selected</eq>>{$v.name}</option>
				</foreach>

			</select>
		</div>
		<div class="input">
			<input type="text" class="form-control" value="{$testee.tname}" id="tname" placeholder="您的姓名">
		</div>
		<div class="input">
			<input type="text" class="form-control" value="{$testee.pphone}"  id="pphone" placeholder="您的联系方式">
		</div>
		<div>
			<div >
				<a href='javascript:;' class="btn btn-warning btn-block " {$OnTime} id="submit">前往竞答</a>
			</div>


			<div >
				<a href='javascript:;' class="btn btn-warning btn-block " id="search">查看分数</a>
			</div>
			<!--<div>-->
				<!--<notempty name="dup">-->
					<!--<span class="notice">您的手机已经在{$dup.finishtime}.{$dup.id}答过题，手机号码【{$dup.pphone}】。</span>-->
				<!--</notempty>-->
			<!--</div>-->
		</div>

	</div>

</div>
<script>
    $(function(){
        $("#search").on("click",function(){
            var group = $("#group").val();
            var tname = $("#tname").val();
            var pphone = $("#pphone").val();
            if(!tname){
                layer.msg("请选择您所在的单位");
                return false;
            }

            if(!tname){
                layer.msg("请填写姓名");
                return false ;
            }
            if(!pphone){
                layer.msg("请填写您的联系方式");
                return false;
            }
            window.location.href="/Ntxx/Answer/search?phone="+encodeURIComponent(pphone);
        });

        $("#submit").on("click",function(){
            var group = $("#group").val();
            var tname = $("#tname").val();
            var pphone = $("#pphone").val();
            if(!tname){
                layer.msg("请选择您所在的单位");
                return false;
            }

            if(!tname){
                layer.msg("请填写姓名");
                return false ;
            }
            if(!pphone){
                layer.msg("请填写您的联系方式");
                return false;
            }
            $.post('{:U("toanswer")}',{group:group,tname:tname,pphone:pphone},function(data){
                if(data.status==0){
                    layer.msg(data.info);
                }
                else{
                    location.reload();
                }
            });
        });
    });

    $(function(){
        audios.play();
    });
    var audios = window["audios"] || {};
    audios = {
        aud: '',
        play: function () {
            var basePath = "/upload/cjdt/";
            var mp3snd = "bg.mp3";

//            if ( $("#bd_audio_1").length > 0 ) {
//                return false;
//            }
            if (this.aud != "") {
                this.aud.play();
                return false;
            }


            this.aud = new Audio();
            this.aud.src = basePath + mp3snd;
            this.aud.loop = "loop";
            this.aud.load();
            setTimeout(function () {
                audios.aud.play();
            }, 300);


        }
    };
</script>
<include file="public/footer" />